﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///WebHelper 的摘要说明
/// </summary>
public class WebHelper
{
	public WebHelper()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}

    public string GetUInfo()
    {
        if (HttpContext.Current.Session["Sid"] != null)
        {
            return HttpContext.Current.Session["Sid"].ToString();
        }
        if (HttpContext.Current.Request.Cookies["Sid"] != null)
        {
            return HttpContext.Current.Request.Cookies["Sid"].Value;
        }
        else
        {
            return "";
        }
    }


    public bool IsLogin()
    {
        if (HttpContext.Current.Request.Cookies["Sid"] != null || HttpContext.Current.Session["Sid"] != null)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}